]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenShield: Avoid unfocused authentication view after resume
authorLukas Schmelting <lschmelting@posteo.com>
Thu, 27 Nov 2025 22:58:32 +0000 (23:58 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 28 Nov 2025 11:33:20 +0000 (11:33 +0000)
When suspending on the authentication page of the lock screen in a user
session, the session resumes with the authentication dialog shown but
its password entry field unfocused. Instead, focus moves to the
authentication dialog itself while _ensureUnlockDialog() in
screenShield.js is called on resume.

Avoid this edge case by switching to the clock view instead before
suspend, which also provides a more consistent user experience.

Co-authored-by: Florian Müllner <fmuellner@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3962>

js/ui/screenShield.js

index 2e3b33197ed16da5e9907808743a3091f60e2d07..65f2e62278bbb31d1068d4bc69ac6c5a2a64aae0 100644 (file)
@@ -244,6 +244,7 @@ export class ScreenShield extends Signals.EventEmitter {
 
     _prepareForSleep(loginManager, aboutToSuspend) {
         if (aboutToSuspend) {
+            this._dialog?.cancel();
             if (this._settings.get_boolean(LOCK_ENABLED_KEY))
                 this.lock(true);
         } else {